<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function fun() {
        alert("函数被调用了");
      }
      // fun()

      // 匿名函数
      const fun1 = function () {
        alert("匿名函数被调用了");
      };
      // fun1()

      // 箭头函数
      const fun2 = () => {
        alert("箭头函数被调用了");
      };
      // fun2()

      const sayHi = (params) => {
        console.log(params)
      };
      sayHi("hello world")
      sayHi(111)

      const sayHi2 = (a,b ,...params) => {
        console.log(params)
      };
      sayHi2(1,2,3,4,5,6,7,8,9)

    </script>
  </body>
</html>
